package bank;

import java.util.HashMap;

import org.junit.Test;

public class ManagerTest {
	public static void main(String[] a){
		String ssn = "1234561234567";
		AccountManager am = new AccountManager();
		
		AccountModel model = new AccountModel();
		model.setAccountNumber("1123");
		model.setName("배재현");
		model.setAddress("주소");
		model.setBalance("0");
		model.setSsn(ssn);
		model.setAge("26");
		am.addAccount(model);
		
		HashMap<String, AccountModel> list = am.getList();
		AccountModel accountModel = list.get(ssn);
		System.out.println(accountModel);
	}
	
	@Test
	public void addTest(){
		String ssn = "1234561234567";
		AccountManager am = new AccountManager();
		
		AccountModel model = new AccountModel();
		model.setAccountNumber("1123");
		model.setName("배재현");
		model.setAddress("주소");
		model.setBalance("0");
		model.setSsn(ssn);
		model.setAge("26");
		am.addAccount(model);
	}
	
	@Test
	public void depositTest(){
		String ssn = "1234561234567";
		AccountManager am = new AccountManager();
		
		AccountModel model = new AccountModel();
		model.setAccountNumber("1123");
		model.setName("배재현");
		model.setAddress("주소");
		model.setBalance("0");
		model.setSsn(ssn);
		model.setAge("26");
		
		am.addAccount(model);
		
		HashMap<String, AccountModel> list = am.getList();
		AccountModel accountModel = list.get(ssn);
		System.out.println(accountModel);
		
		am.deposit(model, 2000);
		HashMap<String, AccountModel> list1 = am.getList();
		AccountModel accountModel1 = list.get(ssn);
		System.out.println(accountModel1);
		
	}
}
